package isanfeng.tuxiaoer.pattern.structural.proxy;

/**
 * @author 李红辉
 * @version 1.0
 * @date 2019/10/14 11:10
 */
public class OrderServiceImpl implements IOrderService {
    private IOrderDao iOrderDao;
    @Override
    public int saveOrder(Order order) {
        // spring 会自己注入，此处直接new
        iOrderDao = new OrderDaoImpl();
        System.out.println("Service层调用Dao层添加order");
        return iOrderDao.insert(order);
    }
}
